package top.sjydzq.www.service;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import top.sjydzq.www.POJO.POJOProduct;
import top.sjydzq.www.bean.Product;

import java.util.List;

@Repository("ProductDAO")
@Mapper
public interface ProductService {
    public List<Product> selectAll();
    public List<Product> selectAllByTid(int typeId);
    public Product selectById(int productId);
    public List<Product> selectByName(String name);
    public List<Product> limitedSelect(int count);
    public List<Product> limitedSelectBestSellers(int count);
    public List<Product> limitedSelectMostStared(int count);
    public void minusStoreAmount(int productId, int amount);
    public void remove(int productId);
    public boolean add(POJOProduct pojoProduct);
    public void edit(POJOProduct pojoProduct);
}
